package com.fas.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.util.Date;

/**
 * 设备历史状态统计表
 */
@Data
public class FasEquipmentHistoryStatistical {

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;//主键
    private Integer cooperationCompanyId;//合作单位id
    private String systemId;//系统id
    private Integer totalNumber = 0;//设备总数 默认为：0
    private Integer alarmNumber = 0;//报警数量 默认为：0
    private Integer faultNumber = 0;//故障数量 默认为：0
    private Integer offlineNumber = 0;//离线数量 默认为：0
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateDate;//更新时间
    private String batchNumber;//批次号 格式： 年+月+当前周在当年是第几周
    private Integer week;//星期（用来排序）
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date statisticalDate;//统计的数据的日期
    private Integer weekOfYear; //在该年的第几周
    private Integer monthOfYear; //在该年的第几月

    //非表字段
    private String companyName;//合作单位名称
    private Integer type;// 1周  2月 3年
    private String name;// 报告名称

    public FasEquipmentHistoryStatistical() {
    }

    @Override
    public String toString() {
        return "FasEquipmentHistoryStatistical{" +
                "id=" + id +
                ", cooperationCompanyId=" + cooperationCompanyId +
                ", systemId='" + systemId + '\'' +
                ", totalNumber=" + totalNumber +
                ", alarmNumber=" + alarmNumber +
                ", faultNumber=" + faultNumber +
                ", offlineNumber=" + offlineNumber +
                ", updateDate=" + updateDate +
                ", batchNumber='" + batchNumber + '\'' +
                ", week=" + week +
                '}';
    }
}
